repo: (minor) Drop a GFile usage in signature creation
authorColin Walters <walters@verbum.org>
Fri, 3 Jun 2016 15:04:17 +0000 (11:04 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Thu, 9 Jun 2016 14:39:09 +0000 (14:39 +0000)
Just one user of hundreds but, the rest of the function was ported
now.

Closes: #319
Approved by: jlebon

src/libostree/ostree-repo.c

index 5c4e941eede65a5fc805f4072e9c777a76f8c4a6..6af5d8e65076799989d5168a7d22c2221bba3075 100644 (file)
@@ -4618,18 +4618,16 @@ ostree_repo_add_gpg_signature_summary (OstreeRepo     *self,
 {
   gboolean ret = FALSE;
   g_autoptr(GBytes) summary_data = NULL;
-  g_autoptr(GFile) signature_path = NULL;
   g_autoptr(GVariant) existing_signatures = NULL;
   g_autoptr(GVariant) new_metadata = NULL;
   g_autoptr(GVariant) normalized = NULL;
   guint i;
-  signature_path = g_file_resolve_relative_path (self->repodir, "summary.sig");
 
   summary_data = ot_file_mapat_bytes (self->repo_dir_fd, "summary", error);
   if (!summary_data)
     goto out;
 
-  if (!ot_util_variant_map_at (AT_FDCWD, gs_file_get_path_cached (signature_path),
+  if (!ot_util_variant_map_at (self->repo_dir_fd, "summary.sig",
                                G_VARIANT_TYPE (OSTREE_SUMMARY_SIG_GVARIANT_STRING),
                                OT_VARIANT_MAP_ALLOW_NOENT, &existing_signatures, error))
     goto out;